<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>My Project: drogon::RequestStreamReader类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">My Project
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacedrogon.html">drogon</a></li><li class="navelem"><a class="el" href="classdrogon_1_1RequestStreamReader.html">RequestStreamReader</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="classdrogon_1_1RequestStreamReader-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">drogon::RequestStreamReader类 参考<span class="mlabels"><span class="mlabel">abstract</span></span></div></div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="RequestStream_8h_source.html">RequestStream.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:afb6b0c9414d4dbedaae206f2a12629d4" id="r_afb6b0c9414d4dbedaae206f2a12629d4"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1RequestStreamReader.html#afb6b0c9414d4dbedaae206f2a12629d4">StreamDataCallback</a> = std::function&lt; void(const char *, size_t)&gt;</td></tr>
<tr class="separator:afb6b0c9414d4dbedaae206f2a12629d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2051420740b5f8ba4444c1f2394d322d" id="r_a2051420740b5f8ba4444c1f2394d322d"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1RequestStreamReader.html#a2051420740b5f8ba4444c1f2394d322d">StreamFinishCallback</a> = std::function&lt; void(std::exception_ptr)&gt;</td></tr>
<tr class="separator:a2051420740b5f8ba4444c1f2394d322d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aece1ef3f1f9fad3a4f5c73e6f4dec763" id="r_aece1ef3f1f9fad3a4f5c73e6f4dec763"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1RequestStreamReader.html#aece1ef3f1f9fad3a4f5c73e6f4dec763">MultipartHeaderCallback</a> = std::function&lt; void(<a class="el" href="structdrogon_1_1MultipartHeader.html">MultipartHeader</a> header)&gt;</td></tr>
<tr class="separator:aece1ef3f1f9fad3a4f5c73e6f4dec763"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:ad897d8c93bac7ec6802f2c9355c686fb" id="r_ad897d8c93bac7ec6802f2c9355c686fb"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1RequestStreamReader.html#ad897d8c93bac7ec6802f2c9355c686fb">~RequestStreamReader</a> ()=default</td></tr>
<tr class="separator:ad897d8c93bac7ec6802f2c9355c686fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0aedf671f073bc54a4d11c51cc7d26fd" id="r_a0aedf671f073bc54a4d11c51cc7d26fd"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1RequestStreamReader.html#a0aedf671f073bc54a4d11c51cc7d26fd">onStreamData</a> (const char *, size_t)=0</td></tr>
<tr class="separator:a0aedf671f073bc54a4d11c51cc7d26fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a356abbf7d1289e178caab8ec0f62d99d" id="r_a356abbf7d1289e178caab8ec0f62d99d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1RequestStreamReader.html#a356abbf7d1289e178caab8ec0f62d99d">onStreamFinish</a> (std::exception_ptr)=0</td></tr>
<tr class="separator:a356abbf7d1289e178caab8ec0f62d99d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a0f3ab8b2e6021bcb555c25ac2b14a9a0" id="r_a0f3ab8b2e6021bcb555c25ac2b14a9a0"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacedrogon.html#a24fc8ca3a2013fb1670c966016155d6a">RequestStreamReaderPtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1RequestStreamReader.html#a0f3ab8b2e6021bcb555c25ac2b14a9a0">newReader</a> (<a class="el" href="classdrogon_1_1RequestStreamReader.html#afb6b0c9414d4dbedaae206f2a12629d4">StreamDataCallback</a> dataCb, <a class="el" href="classdrogon_1_1RequestStreamReader.html#a2051420740b5f8ba4444c1f2394d322d">StreamFinishCallback</a> finishCb)</td></tr>
<tr class="separator:a0f3ab8b2e6021bcb555c25ac2b14a9a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92469326681ed41bbf5f672e1fb26327" id="r_a92469326681ed41bbf5f672e1fb26327"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacedrogon.html#a24fc8ca3a2013fb1670c966016155d6a">RequestStreamReaderPtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1RequestStreamReader.html#a92469326681ed41bbf5f672e1fb26327">newNullReader</a> ()</td></tr>
<tr class="separator:a92469326681ed41bbf5f672e1fb26327"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a42753b30781b72f04f3b46168e9971c2" id="r_a42753b30781b72f04f3b46168e9971c2"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacedrogon.html#a24fc8ca3a2013fb1670c966016155d6a">RequestStreamReaderPtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1RequestStreamReader.html#a42753b30781b72f04f3b46168e9971c2">newMultipartReader</a> (const <a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a> &amp;req, <a class="el" href="classdrogon_1_1RequestStreamReader.html#aece1ef3f1f9fad3a4f5c73e6f4dec763">MultipartHeaderCallback</a> headerCb, <a class="el" href="classdrogon_1_1RequestStreamReader.html#afb6b0c9414d4dbedaae206f2a12629d4">StreamDataCallback</a> dataCb, <a class="el" href="classdrogon_1_1RequestStreamReader.html#a2051420740b5f8ba4444c1f2394d322d">StreamFinishCallback</a> finishCb)</td></tr>
<tr class="separator:a42753b30781b72f04f3b46168e9971c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>An interface for stream request reading. User should create an implementation class, or use built-in handlers </p>
</div><h2 class="groupheader">成员类型定义说明</h2>
<a id="aece1ef3f1f9fad3a4f5c73e6f4dec763" name="aece1ef3f1f9fad3a4f5c73e6f4dec763"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aece1ef3f1f9fad3a4f5c73e6f4dec763">&#9670;&#160;</a></span>MultipartHeaderCallback</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classdrogon_1_1RequestStreamReader.html#aece1ef3f1f9fad3a4f5c73e6f4dec763">drogon::RequestStreamReader::MultipartHeaderCallback</a> =  std::function&lt;void(<a class="el" href="structdrogon_1_1MultipartHeader.html">MultipartHeader</a> header)&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="afb6b0c9414d4dbedaae206f2a12629d4" name="afb6b0c9414d4dbedaae206f2a12629d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb6b0c9414d4dbedaae206f2a12629d4">&#9670;&#160;</a></span>StreamDataCallback</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classdrogon_1_1RequestStreamReader.html#afb6b0c9414d4dbedaae206f2a12629d4">drogon::RequestStreamReader::StreamDataCallback</a> =  std::function&lt;void(const char *, size_t)&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a2051420740b5f8ba4444c1f2394d322d" name="a2051420740b5f8ba4444c1f2394d322d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2051420740b5f8ba4444c1f2394d322d">&#9670;&#160;</a></span>StreamFinishCallback</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classdrogon_1_1RequestStreamReader.html#a2051420740b5f8ba4444c1f2394d322d">drogon::RequestStreamReader::StreamFinishCallback</a> =  std::function&lt;void(std::exception_ptr)&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">构造及析构函数说明</h2>
<a id="ad897d8c93bac7ec6802f2c9355c686fb" name="ad897d8c93bac7ec6802f2c9355c686fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad897d8c93bac7ec6802f2c9355c686fb">&#9670;&#160;</a></span>~RequestStreamReader()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual drogon::RequestStreamReader::~RequestStreamReader </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span><span class="mlabel">default</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a42753b30781b72f04f3b46168e9971c2" name="a42753b30781b72f04f3b46168e9971c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a42753b30781b72f04f3b46168e9971c2">&#9670;&#160;</a></span>newMultipartReader()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespacedrogon.html#a24fc8ca3a2013fb1670c966016155d6a">RequestStreamReaderPtr</a> drogon::RequestStreamReader::newMultipartReader </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a> &amp;&#160;</td>
          <td class="paramname"><em>req</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdrogon_1_1RequestStreamReader.html#aece1ef3f1f9fad3a4f5c73e6f4dec763">MultipartHeaderCallback</a>&#160;</td>
          <td class="paramname"><em>headerCb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdrogon_1_1RequestStreamReader.html#afb6b0c9414d4dbedaae206f2a12629d4">StreamDataCallback</a>&#160;</td>
          <td class="paramname"><em>dataCb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdrogon_1_1RequestStreamReader.html#a2051420740b5f8ba4444c1f2394d322d">StreamFinishCallback</a>&#160;</td>
          <td class="paramname"><em>finishCb</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a92469326681ed41bbf5f672e1fb26327" name="a92469326681ed41bbf5f672e1fb26327"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92469326681ed41bbf5f672e1fb26327">&#9670;&#160;</a></span>newNullReader()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespacedrogon.html#a24fc8ca3a2013fb1670c966016155d6a">RequestStreamReaderPtr</a> drogon::RequestStreamReader::newNullReader </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a0f3ab8b2e6021bcb555c25ac2b14a9a0" name="a0f3ab8b2e6021bcb555c25ac2b14a9a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f3ab8b2e6021bcb555c25ac2b14a9a0">&#9670;&#160;</a></span>newReader()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespacedrogon.html#a24fc8ca3a2013fb1670c966016155d6a">RequestStreamReaderPtr</a> drogon::RequestStreamReader::newReader </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classdrogon_1_1RequestStreamReader.html#afb6b0c9414d4dbedaae206f2a12629d4">StreamDataCallback</a>&#160;</td>
          <td class="paramname"><em>dataCb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdrogon_1_1RequestStreamReader.html#a2051420740b5f8ba4444c1f2394d322d">StreamFinishCallback</a>&#160;</td>
          <td class="paramname"><em>finishCb</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a0aedf671f073bc54a4d11c51cc7d26fd" name="a0aedf671f073bc54a4d11c51cc7d26fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0aedf671f073bc54a4d11c51cc7d26fd">&#9670;&#160;</a></span>onStreamData()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void drogon::RequestStreamReader::onStreamData </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a356abbf7d1289e178caab8ec0f62d99d" name="a356abbf7d1289e178caab8ec0f62d99d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a356abbf7d1289e178caab8ec0f62d99d">&#9670;&#160;</a></span>onStreamFinish()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void drogon::RequestStreamReader::onStreamFinish </td>
          <td>(</td>
          <td class="paramtype">std::exception_ptr&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li><a class="el" href="RequestStream_8h_source.html">RequestStream.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>
